home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7127 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: softsite.co.at!wsog
  2. Date: 15 Feb 1996 09:12:00 +0100
  3. From: wsog@softsite.co.at (Walter Sommergruber)
  4. Newsgroups: comp.lang.c
  5. Message-ID: <62ts6PjMnTB@softsite.co.at>
  6. References: <DMoyuG.CD4@world.std.com>
  7. Subject: Re: c++ and readability
  8. X-Newsreader: XP v3.02
  9. X-Charset: ISO-8859-1
  10. Organization: Sommergruber Software & Dienstleistungen
  11.  
  12. bender  (bender@world.std.com) wrote on 13.02.96
  13. about "c++ and readability":
  14.  
  15. > Its disappointing to me that us C programmers haven't yet developed a
  16. > standard, readable style of writing code.
  17.  
  18. > Now I ask you which is more readable, this:
  19. [snip]
  20. > This is chaos, how do you know
  21. [snip]
  22.  
  23. I would prefer a third style: my style.
  24.  
  25. 4 programmers = at least 5 styles
  26. Welcome to reality :D
  27.  
  28.  
  29. As nearly everyone contributed his style to the thread, here is mine:
  30.  
  31.     /* blank line here */
  32.     if (startImage > endimage)
  33.     {
  34.         for (int i = startImage; i >= endImage; i--)
  35.             result.addElement(new URL(imageSource, "T"+i+".gif"));
  36.     }
  37.     else if (sounds != null)
  38.     {
  39.         const <type> badURL = fetchSounds(sounds);
  40.  
  41.         if (badURL != null)
  42.         {
  43.             loadError(badURL, soundLabel);
  44.             return;
  45.         }
  46.     }
  47.  
  48. /* blank line here */
  49.  
  50. Does anyon need a theoretically approach why my style is the best ?
  51. Kids. ;-)
  52.  
  53. ---                                     Take a look at ...
  54. Walter Sommergruber                                    The Software Site
  55. email: wsog@softsite.co.at           http://www.softsite.co.at/softsite/
  56.